package com.declum.archon.chunkserver.handler.request;

import org.apache.mina.common.IoSession;

import com.declum.archon.chunkserver.server.IChunkServer;

/**
 * Handler for each client request.
 * 
 * @author Clement
 * 
 */
public interface IRequest extends RequestHandlerType {
	/**
	 * Sets the server instance for the handler
	 * 
	 * @param server
	 */
	void setServerInstance(IChunkServer server);

	/**
	 * Process the client request
	 * 
	 * @param session
	 *            client session
	 * @param msg
	 *            data sends by client
	 * @throws Exception
	 *             if any exception while handling the client request
	 */
	void process(IoSession session, Object msg) throws Exception;
}
